<?php

class NewsModel extends Model {
	protected  function _before_write(&$data,&$option){
		require COMMON_PATH.'getsummary.php';
		$data['summary'] = get_summary($data['content']);
		$data['dateline'] = strtotime('now');
	}
}
